﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

using System.Windows.Data;
using System.Windows.Media;

namespace ESC.Designer.Resources
{
    public class RuncardInfoQTYConvert : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            decimal? d1 = values[0] as decimal?;
            decimal? d2 = values[1] as decimal?;
            if (d2 == null)
                return d1;
            else
                return d2;
        }
        

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
